package com.fjnu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.fjnu.dao.IBaseRepairDao;
import com.fjnu.entities.BaseRepair;
import com.fjnu.entities.User;
import com.fjnu.service.IBaseRepairService;
@Service
@Transactional(propagation=Propagation.REQUIRED)
public class BaseRepairService implements IBaseRepairService {
	@Autowired
	private IBaseRepairDao baseRepairDao;
	public List<BaseRepair> findUserRepair(User user) {
		return baseRepairDao.findUserRepair(user);
	}

	
	public BaseRepair findUniqueRepair(int instrumentId) {
		
		return baseRepairDao.findUniqueRepair(instrumentId);
	}


	public void updateRepair(String repairReason, Integer id) {
		baseRepairDao.updateRepair(repairReason, id);

	}


	public void addRepair(BaseRepair baseRepair) {
		baseRepairDao.addRepair(baseRepair);

	}

}
